
<div class="message-container" *ngIf="messageService.messages.length">

  <h2>messages works!</h2>
  <button class="clear" (click)="messageService.clear()">clear</button>
  <button class="add" (click)="messageService.add('假消息')">添加一条假消息</button>
  <div *ngFor='let message of messageService.messages'> {{message}} </div>

</div>